<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "https://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="Content-Language" content="zh-CN"><link href="stylesheet.css" media="all" rel="stylesheet" type="text/css">
<title>触发器</title>
<script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?d286c55b63a3c54a1e43d10d4c203e75"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script>
</head><body class="CHAPTER">
<div>
<table summary="Header navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><th colspan="5" align="center" valign="bottom">PostgreSQL 8.2.3 中文文档</th></tr>
<tr><td width="10%" align="left" valign="top"><a href="xindex.html" accesskey="P">后退</a></td><td width="10%" align="left" valign="top"><a href="extend.html">快退</a></td><td width="60%" align="center" valign="bottom"></td><td width="10%" align="right" valign="top"><a href="rules.html">快进</a></td><td width="10%" align="right" valign="top"><a href="trigger-definition.html" accesskey="N">前进</a></td></tr>
</table>
<hr align="LEFT" width="100%"></div>
<div class="CHAPTER"><h1><a name="TRIGGERS"></a>章34. 触发器</h1>
<div>
<dl>
<dt><b>目录</b></dt>
<dt>34.1. <a href="trigger-definition.html">触发器行为概述</a></dt>
<dt>34.2. <a href="trigger-datachanges.html">数据改变的可视性</a></dt>
<dt>34.3. <a href="trigger-interface.html">用 C 写触发器</a></dt>
<dt>34.4. <a href="trigger-example.html">一个完整的例子</a></dt>
</dl>
</div>
<a name="AEN38284"></a>
<p>本章提供有关书写触发器函数的一般信息。触发器函数可以用大多数过程语言书写，包括 PL/pgSQL(<a href="plpgsql.html">章37</a>), PL/Tcl(<a href="pltcl.html">章38</a>), PL/Perl(<a href="plperl.html">章39</a>), PL/Python(<a href="plpython.html">章40</a>)。阅读完本章之后，你应该参考你喜欢的过程语言的章节，找出使用这些语言书写触发器的一些语言相关的细节。</p>
<p>也可以用 C 来写触发器，不过大多数人都会觉得使用某种过程语言书写更简单。目前还不能用简单的 SQL 函数语言书写触发器函数。</p>
</div>
<div>
<hr align="LEFT" width="100%">
<table summary="Footer navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td width="33%" align="left" valign="top"><a href="xindex.html" accesskey="P">后退</a></td><td width="34%" align="center" valign="top"><a href="index.html" accesskey="H">首页</a></td><td width="33%" align="right" valign="top"><a href="trigger-definition.html" accesskey="N">前进</a></td></tr>
<tr><td width="33%" align="left" valign="top">扩展索引接口</td><td width="34%" align="center" valign="top"><a href="server-programming.html" accesskey="U">上一级</a></td><td width="33%" align="right" valign="top">触发器行为概述</td></tr>
</table>
</div>
</body></html>